From 2f74bede8f35e858274f4875e4de6fa385519986 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 19 Jun 2006 20:47:05 +0000 Subject: [PATCH] When converting HTML to space, convert newlines (and successive whitespace) to single space. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2167 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index cb115058a..4ce933aa7 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -1194,10 +1194,15 @@ strip_html(const utf_string *in) } if (! tag[0]) { - if (*instr == '\n') + if (*instr == '\n') { *out++ = ' '; - else + do { + instr++; + } while (isspace(*instr)); + continue; + } else { *out++ = *instr; + } } else { if (taglen < (sizeof(tag)-1)) { -- 2.30.2